<%@ page language="java" contentType="text/html; charset=UTF-8" isELIgnored="false" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>在线图书管理系统欢迎您</title>
    <style>
        body {
            background-color: #f8f9fa;
        }
        .welcome-card {
            margin-top: 50px;
        }
        .menu a {
            margin: 10px;
        }
    </style>
</head>
<body>
<center>
<div class="container text-center">
    <% if (request.getSession().getAttribute("user") != null) { %>
    <div class="card welcome-card shadow">
        <div class="card-body">
            <h1 class="card-title text-primary">📚 欢迎使用图书管理系统</h1>
            <h4 class="card-subtitle mb-4">当前用户：<span class="text-success">${user.nickname}</span></h4>
            <div class="menu d-flex flex-wrap justify-content-center">
                <a href="allBook" class="btn btn-outline-primary">📖 所有图书</a>
                <a href="addbook.jsp" class="btn btn-outline-success">➕ 增加图书</a>
                <a href="deletebook.jsp" class="btn btn-outline-danger">🗑️ 删除图书</a>
                <a href="borrowManage.jsp" class="btn btn-outline-warning">📦 借阅管理</a>
                <a href="findbook.jsp" class="btn btn-outline-info">🔍 查找图书</a>
                <a href="loginOut" class="btn btn-outline-secondary">🚪 退出登录</a>
            </div>
        </div>
    </div>
    <% } else { %>
    <div class="alert alert-danger mt-5">
        <h3>⚠️ 请登录后再访问此页面</h3>
        <a href="loginOut" class="btn btn-primary mt-3">返回登录</a>
    </div>
    <% } %>
</div>
<center>
</body>
</html>